﻿Namespace DotNetNuke.Modules.UsersOnline.Business
    <Serializable()> _
    Public Class OnlineUserInfo
        Implements DotNetNuke.Entities.Modules.IHydratable

#Region "Private Members"
        Private _UserId As Int32
        Private _UserName As String
        Private _DisplayName As String
        Private _FirstName As String
        Private _LastName As String
        Private _FullName As String
        Private _TabID As Int32
        Private _TabName As String
        Private _TabIsSecure As Boolean
#End Region

#Region "Public Properties"
        Public Property UserId() As Int32
            Get
                Return _UserId
            End Get
            Set(ByVal value As Int32)
                _UserId = value
            End Set
        End Property

        Public Property UserName() As String
            Get
                Return _UserName
            End Get
            Set(ByVal value As String)
                _UserName = value
            End Set
        End Property

        Public Property DisplayName() As String
            Get
                Return _DisplayName
            End Get
            Set(ByVal value As String)
                _DisplayName = value
            End Set
        End Property

        Public Property FirstName() As String
            Get
                Return _FirstName
            End Get
            Set(ByVal value As String)
                _FirstName = value
            End Set
        End Property

        Public Property LastName() As String
            Get
                Return _LastName
            End Get
            Set(ByVal value As String)
                _LastName = value
            End Set
        End Property

        Public Property FullName() As String
            Get
                Return _FullName
            End Get
            Set(ByVal value As String)
                _FullName = value
            End Set
        End Property

        Public Property TabID() As Int32
            Get
                Return _TabID
            End Get
            Set(ByVal value As Int32)
                _TabID = value
            End Set
        End Property

        Public Property TabName() As String
            Get
                Return _TabName
            End Get
            Set(ByVal value As String)
                _TabName = value
            End Set
        End Property

        Public Property TabIsSecure() As Boolean
            Get
                Return _TabIsSecure
            End Get
            Set(ByVal value As Boolean)
                _TabIsSecure = value
            End Set
        End Property
#End Region

#Region "IHydratable Implementation"
        Public Property KeyID() As Integer Implements Entities.Modules.IHydratable.KeyID
            Get
                Return _UserId
            End Get
            Set(ByVal value As Integer)
                _UserId = value
            End Set
        End Property

        Public Sub Fill(ByVal dr As System.Data.IDataReader) Implements Entities.Modules.IHydratable.Fill
            _UserId = dr.GetInt32(0)
            _UserName = dr.GetString(1)
            _DisplayName = dr.GetString(2)
            _FirstName = dr.GetString(3)
            _LastName = dr.GetString(4)
            _FullName = dr.GetString(5)
            _TabID = dr.GetInt32(6)
            _TabName = dr.GetString(7)
            _TabIsSecure = dr.GetBoolean(8)
        End Sub
#End Region

    End Class
End Namespace